const queue = {};
queue.push(1);
queue.push(2);
//shift方法从array中移除第一个元素并返回
const item1 = queue.shift();
const item2 = queue.shift();